import java.awt.Rectangle;

import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;


public class WorldMapGUI extends JFrame
{

	private JButton africaButton = null;
	private JButton caribianButton = null;
	private JButton centralAmericaButton = null;
	private JButton asiaButton = null;
	private JButton europeButton = null;
	private JButton middEastButton = null;
	private JButton  northAmericaButton = null;
	private JButton picificButton = null;
	private JButton  southAmericaButton = null;
	private JPanel contentPane=null;	
	
	public  WorldMapGUI()
	{
		super();
	    JPanel contentPane=new JPanel();
	
		
		   //Main Window panel 
	    contentPane.setLayout(null);
	    contentPane.setOpaque(true);
	    contentPane.add(getAsiaButton());
	    contentPane.add(getAfricaButton());
	    contentPane.add(getEuropeButton());
	    contentPane.add(getMiddleEastButton());
	    contentPane.add(getSouthAmericaButton());
	    contentPane.add(getNorthAmericaButton());
	    contentPane.add(getPicificButton());
	    contentPane.add(getCaribianButton());
	    contentPane.add(getCentralAmericaButton());
	    validate();
	    

		  //Frame
	        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	        this.setTitle(" World Map Window");
	        this.setContentPane(contentPane);  
		    this.setLocationRelativeTo(null); //This will center the JFrame in the middle of the screen
	        this.setLocationByPlatform(true);
	        this.setSize(574, 521);
	        this.setVisible( true ); // display frame
	
	}
	
	/**
	 * This method initializes Asia Button	
	 */
	private JButton getAsiaButton() {
		if (asiaButton == null) {
			asiaButton = new JButton();
			asiaButton.setBounds(new Rectangle(82, 98, 95, 45));
			asiaButton.setIcon(new ImageIcon("C://Users/Tal/workspace/Build GUI/src/WorldMap/asia.JPG"));
			asiaButton.addActionListener(new java.awt.event.ActionListener() 
			{
				public void actionPerformed(java.awt.event.ActionEvent e) 
				{
					
					
				 
				
				}
			});
		}
		return asiaButton;
	}
	
	/**
	 * This method initializes Africa Button	
	 */
	private JButton getAfricaButton() {
		if (africaButton == null) {
			africaButton = new JButton();
			africaButton.setBounds(new Rectangle(274, 74, 95, 45));
			africaButton.setIcon(new ImageIcon("C://Users/Tal/workspace/Build GUI/src/WorldMap/africa.JPG"));
			africaButton.addActionListener(new java.awt.event.ActionListener() 
			{
				public void actionPerformed(java.awt.event.ActionEvent e) 
				{
					
					
				 
				
				}
			});
		}
		return africaButton;
	}
	
	/**
	 * This method initializes Middle East Button	
	 */
	private JButton getMiddleEastButton() {
		if (middEastButton == null) {
			middEastButton = new JButton();
			middEastButton.setBounds(new Rectangle(306, 326, 95, 45));
			middEastButton.setIcon(new ImageIcon("C://Users/Tal/workspace/Build GUI/src/WorldMap/middleast.JPG"));
			middEastButton.addActionListener(new java.awt.event.ActionListener() 
			{
				public void actionPerformed(java.awt.event.ActionEvent e) 
				{
					
					
				 
				
				}
			});
		}
		return middEastButton;
	}
	
	/**
	 * This method initializes Europe Button	
	 */
	private JButton getEuropeButton() {
		if (europeButton == null) {
			europeButton = new JButton();
			europeButton.setBounds(new Rectangle(161, 342, 95, 45));
			europeButton.setIcon(new ImageIcon("C://Users/Tal/workspace/Build GUI/src/WorldMap/europe.JPG"));
			europeButton.addActionListener(new java.awt.event.ActionListener() 
			{
				public void actionPerformed(java.awt.event.ActionEvent e) 
				{
					
					
				 
				
				}
			});
		}
		return europeButton;
	}
	
	
	/**
	 * This method initializes south America Button	
	 */
	private JButton getSouthAmericaButton() {
		if (southAmericaButton == null) {
			southAmericaButton = new JButton();
			southAmericaButton.setBounds(new Rectangle(411, 141, 95, 45));
			southAmericaButton.setIcon(new ImageIcon("C://Users/Tal/workspace/Build GUI/src/WorldMap/southAmerica.JPG"));
			southAmericaButton.addActionListener(new java.awt.event.ActionListener() 
			{
				public void actionPerformed(java.awt.event.ActionEvent e) 
				{
					
					
				 
				
				}
			});
		}
		return southAmericaButton;
	}
	
	/**
	 * This method initializes north America Button	
	 */
	private JButton getNorthAmericaButton() {
		if (northAmericaButton == null) {
			northAmericaButton = new JButton();
			northAmericaButton.setBounds(new Rectangle(306, 238, 95, 45));
			northAmericaButton.setIcon(new ImageIcon("C://Users/Tal/workspace/Build GUI/src/WorldMap/northAmerica.JPG"));
			northAmericaButton.addActionListener(new java.awt.event.ActionListener() 
			{
				public void actionPerformed(java.awt.event.ActionEvent e) 
				{
					
					
				 
				
				}
			});
		}
		return northAmericaButton;
	}

	
	/**
	 * This method initializes picific Button	
	 */
	private JButton getPicificButton() {
		if (picificButton == null) {
			picificButton = new JButton();
			picificButton.setBounds(new Rectangle(82, 188, 95, 45));
			picificButton.setIcon(new ImageIcon("C://Users/Tal/workspace/Build GUI/src/WorldMap/picific.JPG"));
			picificButton.addActionListener(new java.awt.event.ActionListener() 
			{
				public void actionPerformed(java.awt.event.ActionEvent e) 
				{
					
					
				 
				
				}
			});
		}
		return picificButton;
	}
	
	
	/**
	 * This method initializes caribian Button	
	 */
	private JButton getCaribianButton() {
		if (caribianButton == null) {
			caribianButton = new JButton();
			caribianButton.setBounds(new Rectangle(45, 263, 95, 45));
			caribianButton.setIcon(new ImageIcon("C://Users/Tal/workspace/Build GUI/src/WorldMap/caribian.JPG"));
			caribianButton.addActionListener(new java.awt.event.ActionListener() 
			{
				public void actionPerformed(java.awt.event.ActionEvent e) 
				{
					
					
				 
				
				}
			});
		}
		return caribianButton;
	}

	
	/**
	 * This method initializes centralAmericaButton Button	
	 */
	private JButton getCentralAmericaButton() {
		if (centralAmericaButton == null) {
			centralAmericaButton = new JButton();
			centralAmericaButton.setBounds(new Rectangle(244, 171, 95, 45));
			centralAmericaButton.setIcon(new ImageIcon("C://Users/Tal/workspace/Build GUI/src/WorldMap/centralAmerica.JPG"));
			centralAmericaButton.addActionListener(new java.awt.event.ActionListener() 
			{
				public void actionPerformed(java.awt.event.ActionEvent e) 
				{
					
					
				 
				
				}
			});
		}
		return centralAmericaButton;
	}
	
	

	
}
